package com.one.efaimaly.order.model.extra;

import com.one.common.model.extra.BaseExtra;
import com.one.common.utils.StringUtils;
import com.one.common.utils.list.ListUtils;

import java.util.ArrayList;

/**
 * author ：zhulunjun
 * email  ：zhulunjun@qq.com
 * date   ：2018/10/20 下午5:44
 * description ：上传图片参数
 **/
public class UploadImgExtra extends BaseExtra {

    private String order_maintail_imgs1;//维修前图片

    private String order_maintail_imgs2;//维修好图片
    private String orderId;

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public UploadImgExtra(String orderId) {
        this.orderId = orderId;
    }

    public UploadImgExtra(String order_maintail_imgs1, String order_maintail_imgs2, String orderId) {
        this.order_maintail_imgs1 = order_maintail_imgs1;
        this.order_maintail_imgs2 = order_maintail_imgs2;
        this.orderId = orderId;
    }


    public String getOrder_maintail_imgs1() {
        return order_maintail_imgs1;
    }

    public void setOrder_maintail_imgs1(String order_maintail_imgs1) {
        this.order_maintail_imgs1 = order_maintail_imgs1;
    }

    public String getOrder_maintail_imgs2() {
        return order_maintail_imgs2;
    }

    public void setOrder_maintail_imgs2(String order_maintail_imgs2) {
        this.order_maintail_imgs2 = order_maintail_imgs2;
    }

    public ArrayList<String> getList1() {
        if (StringUtils.isNotBlank(order_maintail_imgs1)) {
            return ListUtils.arrayToAreList(order_maintail_imgs1.split(","));
        }
        return new ArrayList();
    }


    public ArrayList<String> getList2() {
        if (StringUtils.isNotBlank(order_maintail_imgs2)) {
            return ListUtils.arrayToAreList(order_maintail_imgs2.split(","));
        }
        return new ArrayList();
    }

}
